
package com.mymail.job;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mymail.mailservice.MailService;
import com.mymail.model.Order;



public class TestSendMain {
	
	
	@Test
	public void test() throws InterruptedException{
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		System.out.println("start to sendmail");
		MailService sf = (MailService) context.getBean("emailservice");
		Order env = (Order) context.getBean("ordermodel");
		Order order = new Order();
		order.setUsermail(env.getUsermail());
		sf.sendOrderMail(order);
	}

}
